<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript" src="../js/jquery-3.3.1.min.js"></script>
</head>
<body>
<input type="button" value="查询" id="btn">
<table id="table">
    <tr>
        <td>姓名</td>
        <td>年龄</td>
        <td>身价</td>
    </tr>
</table>
</body>
</html>
<script type="text/javascript">
    $(function () {
       $("#btn").click(function () {
           $.ajax({
               url:"../Json/data.json",
               type:"get",
               dataType:"",
               data:"json",
               async:"",
               success:function (data) {
                   // alert(data[1].name)
                    var html="";
                   for (var i = 0; i <data.length ; i++) {
                       html = '<tr>' +
                           '        <td>'+data[i].name+'</td>' +
                           '        <td>'+data[i].age+'</td>' +
                           '        <td>'+data[i].money+'</td>' +
                           '    </tr>'
                       $("#table").append(html)
                   }
               },
               error:function () {
                    alert("请求失败")
               }

           });
       })
    });
</script>